package com.sdkj.service.company;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sdkj.dao.DaoSupport;
import com.sdkj.entity.Page;
import com.sdkj.util.PageData;


@Service("boapplyService")
public class BoApplyService {

	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/*
	* 新增
	*/
	public void save(PageData pd)throws Exception{
		 dao.save("BoApplyMapper.save", pd);
	}
	
	/*
	* 删除
	*/
	public void delete(PageData pd)throws Exception{
		dao.delete("BoApplyMapper.delete", pd);
	}
	/*
	 * 添加注销原因
	 */
	public void logoffReason(PageData pd)throws Exception{
		dao.update("BoApplyMapper.logoffReason", pd);
	}
	/*
	 * 变更申请
	 */
	public void updateApply(PageData pd)throws Exception{
		dao.update("BoApplyMapper.updateApplyInfo", pd);
	}
	/*
	 * 修改状态
	 */
	public void chatSuccess(PageData pd)throws Exception{
		dao.update("BoApplyMapper.updatestatus", pd);
	}
	/*
	 * 注销申请
	 */
	public void logoff(PageData pd)throws Exception{
		dao.update("BoApplyMapper.logoff", pd);
	}
	  public List<PageData> bologoff(Page page)throws Exception{
		  return (List<PageData>)dao.findForList("BoApplyMapper.bologofflistPage", page);
	  }
	/*
	 * 查询分公司信息
	 */
	  public List<PageData> boinfo(Page page)throws Exception{
		  return (List<PageData>)dao.findForList("BoApplyMapper.boinfolistPage", page);
	  }
	/*
	* 修改
	*/
	public void edit(PageData pd)throws Exception{
		 dao.update("BoApplyMapper.edit", pd);
	}
	
	/*
	*列表
	*/
	public List<PageData> list(Page page)throws Exception{
		return (List<PageData>)dao.findForList("BoApplyMapper.datalistPage", page);
	}
	/*
	 * 申请列表
	 */
	public List<PageData> applyList(Page page)throws Exception{
		return (List<PageData>)dao.findForList("BoApplyMapper.applylistPage", page);
	}
	/*
	*列表(全部)
	*/
	public List<PageData> listAll(PageData pd)throws Exception{
		return (List<PageData>)dao.findForList("BoApplyMapper.listAll", pd);
	}
	
	/*
	* 通过id获取数据
	*/
	public PageData findById(PageData pd)throws Exception{
		return (PageData)dao.findForObject("BoApplyMapper.findById", pd);
	}
	
	/*
	* 批量删除
	*/
	public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
		dao.delete("BoApplyMapper.deleteAll", ArrayDATA_IDS);
	}
	
}

